package com.henanuniversity.service.impl;

import com.henanuniversity.dao.BusinessDao;
import com.henanuniversity.dao.impl.BusinessDaoImpl;
import com.henanuniversity.po.Business;
import com.henanuniversity.service.BusinessService;
import com.henanuniversity.utils.DBUtils;

import java.util.ArrayList;
import java.util.List;

public class BusinessServiceimpl implements BusinessService {
    @Override
    public List<Business> listBusinessByOrderTypeId(Integer orderTypeId) {
        List<Business> list = new ArrayList<Business>();
        BusinessDao dao = new BusinessDaoImpl();
        list = dao.listBusinessByOrderTypeId(orderTypeId);
        DBUtils.close();
        return list;

    }

    @Override
    public Business getBusinessById(Integer businessId) {
        Business  business=null;
        BusinessDao dao = new BusinessDaoImpl();
        business = dao.getBusinessById(businessId);
        DBUtils.close();
        return business;
    }
}
